home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- SSCCVVSS CChheeaatt SShheeeett
-
- November 3, 1991
-
-
- The SCVS Cheat Sheet explains some of the standard uses
- of ssccvvss. If you want to do something that is not covered
- here you should refer to the man pages for ssccvvss, ccvvss, and
- rrccss. SSccvvss manages source directory trees called modules.
- SSccvvss modules for the kernel correspond to what we've tradi-
- tionally called modules, e.g. net, timer, mach, etc. The
- "master" copy of the modules is stored in the repository,
- which is a directory tree of RCS files rooted at
- /sprite/src/kernel/Cvsroot. In order to modify the source
- for a module you must first get your own copy of the module.
- Make your changes in your copy, and when you are satisfied
- with them commit your changes to the repository. Your
- changes are not applied to the repository until you commit
- them, at which time they become the "latest" version of the
- sources. Throughout this cheat sheet the term "latest ver-
- sion" refers to the current version of the sources in the
- repository.
-
-
- HHooww ddoo II ggeett aa ccooppyy ooff aa mmoodduullee??
-
- Copies of kernel modules are usually kept in your
- kernel build directory
- (/sprite/src/kernel/username)).. IInn tthhiiss ddiirreeccttoorryy
- ttyyppee ssccvvss ccoo module.. AA ssuubbddiirreeccttoorryy ccaalllleedd module
- wwiillll bbee ccrreeaatteedd,, aanndd iitt wwiillll bbee ppooppuullaatteedd wwiitthh tthhee
- ccuurrrreenntt vveerrssiioonn ooff tthhee mmoodduullee.. YYoouu wwiillll bbee ttoolldd
- aabboouutt ootthheerr uusseerrss tthhaatt hhaavvee aa ccooppyy ooff tthhee mmoodduullee
- cchheecckkeedd oouutt,, iinncclluuddiinngg aannyy ootthheerr ccooppiieess yyoouu mmiigghhtt
- hhaavvee.. YYoouu mmaayy wwaanntt ttoo cchheecckk wwiitthh tthheessee ppeeooppllee ttoo
- mmaakkee ssuurree tthhaatt yyoouurr cchhaannggeess wwiillll bbee ccoommppaattiibbllee.. IIff
- yyoouu ddoonn''tt iinntteenndd ttoo ccoommmmiitt yyoouurr cchhaannggeess ttoo tthhee rree--
- ppoossiittoorryy tthheenn yyoouu sshhoouulldd uussee tthhee --ii ooppttiioonn ssoo tthhaatt
- ootthheerr uusseerrss aarree nnoott ttoolldd aabboouutt yyoouurr ccooppyy..
-
- AAfftteerr tthhee cchheecckkoouutt iiss ccoommpplleettee yyoouu nneeeedd ttoo rruunn mmkkmmff
- iinn yyoouurr ccooppyy ttoo ccrreeaattee aa MMaakkeeffiillee,, ddeeppeennddeenncciieess..mmkk,,
- eettcc..
-
- IItt iiss ookk ttoo rree--cchheecckkoouutt aa mmoodduullee iiff yyoouu cchheecckkeedd iitt
- oouutt bbeeffoorree aanndd ssttiillll hhaavvee tthhee ssoouurrccee ttrreeee..
-
-
-
-
-
-
-
-
-
- 11
-
-
-
-
-
-
-
-
-
-
-
- HHooww ddoo II ggeett iinnffoorrmmaattiioonn aabboouutt tthhee ssttaattuuss ooff mmyy ccooppyy ooff
- aa mmoodduullee??
-
- Once you have a copy of a module you may want some
- information about the files in your copy, like
- which ones you've modified and which ones are out-
- of-date with the latest version. ssccvvss iinnffoo will
- tell you what you want to know. Here's what its
- output means:
-
- UU file Your copy of file needs to be updated.
- MM file You've modified file.
- CC file You've modified file, and it is also out-of-date.
- AA file You've added file.
- RR file You've removed file.
- DD file Somebody deleted file from the repository.
-
-
-
-
-
- WWhhaatt iiff II wwaanntt mmoorree iinnffoorrmmaattiioonn aabboouutt mmyy ccooppyy ooff aa ffiillee??
-
- The command ssccvvss ssttaattuuss file will give you RCS in-
- formation about the your copy of a file and the la-
- test version of the file. Here is some sample out-
- put for the file timerInt.h.
-
- File: timerInt.h
- From: 9.8 Fri Sep 13 15:04:52 1991 timerInt.h
- RCS: 9.9 /sprite/src/kernel/Cvsroot/kernel/timer/timerInt.h,v
-
-
- The From: line tells you that your copy of
- timerInt.h came from RCS version 9.8 of that file,
- and that you created the copy on Friday, September
- 13, 1991 at 15:04:52. The RCS: line tells you that
- the latest RCS version of the file is 9.9, and it
- gives you the full path to the RCS file, not that
- you would ever need it.
-
-
-
-
- HHooww ddoo II ggeett tthhee RRCCSS lloogg ffoorr mmyy ccooppyy ooff aa ffiillee??
-
- SSccvvss lloogg file will print out the RCS log for the
- file.
-
-
-
-
-
-
- 22
-
-
-
-
-
-
-
-
-
-
-
- HHooww ddoo II rruunn ddiiffff oonn mmyy ccooppyy ooff aa ffiillee??
-
- SSccvvss ddiiffff file will do a rrccssddiiffff between your copy
- of a file and the version from which it came. If
- you want to do a diff between your version and the
- latest version you should do ssccvvss ddiiffff --RR file.
- You can also do diffs between various versions of
- the file by specifying the standard --rr options.
-
-
-
-
- HHooww ddoo II bbrriinngg mmyy ccooppyy uupp--ttoo--ddaattee wwiitthh tthhee llaatteesstt vveerr--
- ssiioonn??
-
- If your copy of the sources is out-of-date with the
- latest version in the repository you can update it
- using ssccvvss uuppddaattee [modules|subdirs|files]. If you
- don't specify any files it will update all files in
- the current directory and its subdirectories, oth-
- erwise it will only update the files or subdirec-
- tories you listed. If ssccvvss uuppddaattee discovers that
- you have modified a file, and the copy of the file
- in the repository has changed also, it will use
- rrccssmmeerrggee to try and merge the changes. If this
- happens you will want to look at the file to make
- sure the changes were compatible. The output from
- ssccvvss uuppddaattee is similar to that of ssccvvss iinnffoo:
-
- UU file Your copy of file was updated.
- MM file Your changes to file were merged with the new version.
- CC file Your changes to file were merged, but there was a conflict.
- AA file You've added file.
- RR file You've removed file.
- DD file file was deleted from your sources.
-
-
- An "update" target has been added to the Makefile
- for kernel modules so that ppmmaakkee uuppddaattee will run
- ssccvvss uuppddaattee. This is useful for updating all
- modules in /sprite/src/kernel..
-
-
-
-
- WWhhoo eellssee hhaass aa ccooppyy ooff tthhee ssaammee mmoodduullee??
-
- When you check out a module you will be told about
- other users who also have a copy. You can also
- find out by doing ssccvvss wwhhoo [modules].
-
-
-
-
- 33
-
-
-
-
-
-
-
-
-
-
-
- WWhhaatt iiff II jjuusstt wwaanntt ttoo llooookk aatt tthhee ssoouurrcceess ffoorr aa mmoodduullee??
-
- Copies of all kernel modules are kept in
- /sprite/src/kernel.. TThheessee ccooppiieess aarree rreeaadd--oonnllyy ssoo
- ddoonn''tt ttrryy ttoo mmooddiiffyy tthheemm.. TThheessee ccooppiieess ccaann bbee uusseedd
- ffoorr bbrroowwssiinngg,, aass wweellll aass ffoorr bbuuiillddiinngg tthhee oobbjjeecctt
- ffiilleess tthhaatt aarree uusseedd ttoo pprroodduuccee ooffffiicciiaall kkeerrnneellss..
-
-
-
-
- HHooww ddoo II aadddd aa nneeww ffiillee ttoo aa mmoodduullee??
-
- SSccvvss only deals with files it knows about. If ssccvvss
- hasn't been told about a file it will be ignored by
- any ssccvvss commands. To add a file to a module
- create the file in your copy of the module, then
- type ssccvvss aadddd file. The file must exist in order to
- be added. The file will not be added to the repo-
- sitory until you ccoommmmiitt your changes.
-
-
-
-
- HHooww ddoo II aadddd aa nneeww ssuubbddiirreeccttoorryy ttoo aa mmoodduullee??
-
- Subdirectories are added using ssccvvss aadddd in your
- copy of a module just like files, except that you
- will be asked if you really want to do this. If
- the subdirectory contains any files they must be
- added individually (aadddd is not recursive).
-
-
-
-
- HHooww ddoo II rreemmoovvee aa ffiillee ffrroomm aa mmoodduullee??
-
- In your copy of a module type ssccvvss rreemmoovvee file to
- remove a file. If the file still exists it will be
- deleted. The file will not be removed from the re-
- pository until you ccoommmmiitt your changes.
-
-
-
-
- OOooppss.. II jjuusstt aacccciiddeennttllyy rreemmoovveedd aa ffiillee ffrroomm mmyy ccooppyy!!
-
- If you haven't ccoommmmiittted your changes yet, you can
- retrieve the file using ssccvvss aadddd file. It will
- give you the version of the file you originally
- checked out.
-
-
-
- 44
-
-
-
-
-
-
-
-
-
-
-
- HHooww ddoo II aadddd aa nneeww mmoodduullee ttoo tthhee rreeppoossiittoorryy??
-
- Don't try this at home. Send mail to jhh@sprite.
-
-
-
-
- HHooww ddoo II uunnddoo mmyy cchhaannggeess ttoo aa ffiillee??
-
- Currently the best way to do this is to use ssccvvss
- rreemmoovvee file, followed by ssccvvss aadddd file. This will
- give you the version of the file you originally
- checked out.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 55
-
-
-
-
-
-
-
-
-
-
-
- HHooww ddoo II ccoommmmiitt mmyy cchhaannggeess ttoo aa mmoodduullee??
-
- After you have made your changes to a module you
- need to commit them into the repository. There are
- several steps in committing your changes:
-
- (1) Verify that your copy is up-to-date and it works
- properly.
-
- (2) Lock the module(s) using ssccvvss lloocckk [modules].
- Locking the modules prevents other users from
- committing changes at the same time.
-
- (3) Use ssccvvss ccoommmmiitt [files] (ccoommmmiitt is usually abbre-
- viated as ccii) to commit your changes. Each ssccvvss
- ccii command allows you to specify one log message
- (either using --mm or by bringing up an editor). If
- you want all the files you modified to have the
- same message use ssccvvss ccii without any options,
- otherwise you must run ssccvvss ccii once for each mes-
- sage and corresponding list of files.
-
- (4) As you commit your changes the copy of the
- sources in /sprite/src/kernel/module will be up-
- dated. These copies are used to build kernels,
- so you need to recompile any source files you may
- have changed. To do this cd to
- /sprite/src/kernel/module. Run mmkkmmff, followed by
- ppmmaakkee. Make sure the resulting object files pro-
- duce a working kernel. Then run ppmmaakkee iinnssttaallll.
- Be sure to compile and install for all machine
- types. If the sources don't build a working ker-
- nel then you may have forgotten to aadddd or rreemmoovvee
- a file.
-
- (5) Unlock the modules using ssccvvss uunnlloocckk [modules].
- Don't forget to do this.
-
-
-
-
- WWhhaatt ddoo II ddoo wwhheenn II''mm ddoonnee wwiitthh mmyy ccooppyy??
-
- ssccvvss ddoonnee lets ssccvvss know that you are done with
- your copy, so that other users will no longer be
- told about it. The --dd option will delete your
- copy. Use the --dd option with care. If you deleted
- your copy using rrmm without running ssccvvss ddoonnee first
- then ssccvvss will think you still have a copy. You
- set it straight with ssccvvss ddoonnee pathname, where
- pathname is the full pathname of the copy you used
- to have.
-
-
- 66
-
-
-
-
-
-
-
-
-
-
-
- HHooww ddoo II uunnlloocckk aa lloocckkeedd mmoodduullee??
-
- If ssvvccss is killed unexpectedly it will leave locks
- on any modules it was processing at the time. If
- you have an unwanted lock on a module you can re-
- move it with ssccvvss uunnlloocckk [modules]. If you want to
- remove all locks on a module, even those owned by
- other people, you can do so with ssccvvss uunnlloocckk --aa
- [modules].
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 77
-
-
-
-